//线上环境
// let domainName = "zhongyousifu.com" //域名
// const portalUrlProd = "https://www." + domainName //前端门户
// const adminUrlProd = "https://mp." + domainName //前端管理界面
// const baseUrlProd = "https://www." + domainName //后端接口基础路径
// const websocketURlProd = "ws://" + domainName + ":7000/WebSocket" //socket路径

let domainName = "zhongyousifu.com" //域名
const portalUrlProd = "http://www." + domainName + ":81" //前端门户
const adminUrlProd = "http://mp." + domainName + ":81" //前端管理界面
const baseUrlProd = "http://www." + domainName + ":81" //后端接口基础路径
const websocketURlProd = "ws://" + domainName + ":7000/WebSocket" //socket路径

//测试环境
// const portalUrlDev = "http://localhost:3000"
// const adminUrlDev = "http://localhost:5173"
// const baseUrlDev = "http://127.0.0.1:8081";
// const websocketURlDev = "ws://localhost:7000/WebSocket"

//测试环境
const portalUrlDev = "http://120.244.126.7:3000"
const adminUrlDev = "http://120.244.126.7:5173"
const baseUrlDev = "http://127.0.0.1:8081";
const websocketURlDev = "ws://120.244.126:7000/WebSocket"

// 判断服务端的环境变量中的NODE_ENV是否为TRUE
// let isProd = process.env.NODE_ENV === 'production' || false
// let isProd = false
let isProd = true

// 真正的请求地址
export const baseUrl = isProd ? baseUrlProd : baseUrlDev
export const portalUrl = isProd ? portalUrlProd : portalUrlDev
export const adminUrl = isProd ? adminUrlProd : adminUrlDev
export const websocketURl = isProd ? websocketURlProd : websocketURlDev
export const pxToRem = 10
/*默认用户相关参数*/
export const ROLE_ROOT = 100000000; //角色：最高权限
export const ROLE_MASTER = 10000; //角色：次高权限
export const ROLE_ADMIN = 1000;   //角色：管理员
export const ROLE_NORMAL = 1; //角色：普通用户
export const ROLE_USER = 0; //角色：匿名用户
